
<%@ page import="apralms.Scheme" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'scheme.label', default: 'Scheme')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-scheme" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-scheme" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list scheme">
			
				<g:if test="${schemeInstance?.code}">
				<li class="fieldcontain">
					<span id="code-label" class="property-label"><g:message code="scheme.code.label" default="Code" /></span>
					
						<span class="property-value" aria-labelledby="code-label"><g:fieldValue bean="${schemeInstance}" field="code"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${schemeInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="scheme.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${schemeInstance}" field="name"/></span>
					
				</li>
				</g:if>			
			
				<g:if test="${schemeInstance?.project}">
				<li class="fieldcontain">
					<span id="project-label" class="property-label"><g:message code="scheme.project.label" default="Project" /></span>
					
						<span class="property-value" aria-labelledby="project-label"><g:link controller="project" action="show" id="${schemeInstance?.project?.id}">${schemeInstance?.project?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
				
				<g:if test="${schemeInstance?.runTime}">
				<li class="fieldcontain">
					<span id="runTime-label" class="property-label"><g:message code="scheme.runTime.label" default="RunTime" /></span>
					
						<span class="property-value" aria-labelledby="runTime-label"><g:fieldValue bean="${schemeInstance}" field="runTime"/></span>
					
				</li>
				</g:if>
				
				<g:if test="${schemeInstance?.calMode1}">
				<li class="fieldcontain">
					<span id="calMode1-label" class="property-label"><g:message code="scheme.calMode1.label" default="Cal Mode 1" /></span>
					
						<span class="property-value" aria-labelledby="calMode1-label"><g:message code="scheme.calMode.${schemeInstance?.calMode1}" default="Cal Mode 1" /></span>						
					
				</li>
				</g:if>
				
				<g:if test="${schemeInstance?.calMode2}">
				<li class="fieldcontain">
					<span id="calMode2-label" class="property-label"><g:message code="scheme.calMode2.label" default="Cal Mode 2" /></span>
					
						<span class="property-value" aria-labelledby="calMode2-label"><g:message code="scheme.calMode.${schemeInstance?.calMode2}" default="Cal Mode 2" /></span>						
					
				</li>
				</g:if>
				
			
				<g:if test="${false && schemeInstance?.projectIndexes}">
				<li class="fieldcontain">
					<span id="projectIndexes-label" class="property-label"><g:message code="scheme.projectIndexes.label" default="Project Indexes" /></span>
					
						<g:each in="${schemeInstance.projectIndexes}" var="p">
						<span class="property-value" aria-labelledby="projectIndexes-label"><g:link controller="projectIndex" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${false && schemeInstance?.systemIndexes}">
				<li class="fieldcontain">
					<span id="systemIndexes-label" class="property-label"><g:message code="scheme.systemIndexes.label" default="System Indexes" /></span>
					
						<g:each in="${schemeInstance.systemIndexes}" var="s">
						<span class="property-value" aria-labelledby="systemIndexes-label"><g:link controller="systemIndex" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
				
				<g:if test="${false && schemeInstance?.productIndexes}">
				<li class="fieldcontain">
					<span id="productIndexes-label" class="property-label"><g:message code="scheme.productIndexes.label" default="Product Indexes" /></span>
					
						<g:each in="${schemeInstance.productIndexes}" var="p">
						<span class="property-value" aria-labelledby="productIndexes-label"><g:link controller="productIndex" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>

				<g:if test="${schemeInstance?.dateCreated}">
				<li class="fieldcontain">
					<span id="dateCreated-label" class="property-label"><g:message code="scheme.dateCreated.label" default="Date Created" /></span>
					
						<span class="property-value" aria-labelledby="dateCreated-label"><g:formatDate date="${schemeInstance?.dateCreated}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${schemeInstance?.lastUpdated}">
				<li class="fieldcontain">
					<span id="lastUpdated-label" class="property-label"><g:message code="scheme.lastUpdated.label" default="Last Updated" /></span>
					
						<span class="property-value" aria-labelledby="lastUpdated-label"><g:formatDate date="${schemeInstance?.lastUpdated}" /></span>
					
				</li>
				</g:if>								
				
				<li class="fieldcontain">
				<div id="celebs">
			        <ul id="accordion">
		        	<li>
		        		项目指标
		        		<ul>
			        		<g:if test="${schemeInstance?.projectIndexes}">
							<g:each in="${schemeInstance.projectIndexes}" var="s">
							<li>
								<g:link controller="projectIndex" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link>
							</li>
							</g:each>
							</g:if>
						</ul>
		        	</li>
		        	<li>
		        		系统指标
		        		<ul>
			        		<g:if test="${schemeInstance?.systemIndexes}">
							<g:each in="${schemeInstance.systemIndexes}" var="s">
							<li>
								<g:link controller="systemIndex" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link>
							</li>
							</g:each>
							</g:if>
						</ul>
		        	</li>
		        	<li>
		        		产品指标
		        		<ul>
			        		<g:if test="${schemeInstance?.productIndexes}">
							<g:each in="${schemeInstance.productIndexes}" var="s">
							<li>
								<g:link controller="productIndex" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link>
							</li>
							</g:each>
							</g:if>
						</ul>
		        	</li>
		        </ul> 
		      </div>		      
		      </li>
		      
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${schemeInstance?.id}" />
					<g:link class="edit" action="edit" id="${schemeInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
					<g:actionSubmit class="edit" action="calculate" value="${message(code: 'default.button.calculate.label', default: 'Calculate')}" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
